package main

import "fmt"

var j int

func init() {
	fmt.Println("init() k")
	k = 1
}

func init() {
	fmt.Println("init() j")
	j = 1
}

var i = t()

var k int

func main() {
	i := 10
	j := 9
	i, j = j, i
	fmt.Printf("i=%d\n", i)
	fmt.Printf("j=%d\n", j)

	arr := []int{9, 10}
	arr[0], arr[1] = arr[1], arr[0]
	fmt.Println(arr)

	ch := make(chan int, 2)
	ch <- 1
	ch <- 2

	fmt.Println(<-ch)
	fmt.Println(<-ch)
}

func t() int {
	fmt.Println("t()")
	return 1
}
